<template>
  <div class="login-page">
    <div class="login-container">
      <div class="login-left">
        <div class="welcome-content">
          <h1>欢迎使用在线考试与题库系统</h1>
          <p>这是一个现代化的教育管理平台，为学校提供完整的用户管理和权限控制功能。</p>
          <div class="features">
            <div class="feature-item">
              <el-icon><User /></el-icon>
              <span>学生管理</span>
            </div>
            <div class="feature-item">
              <el-icon><School /></el-icon>
              <span>教师管理</span>
            </div>
            <div class="feature-item">
              <el-icon><Setting /></el-icon>
              <span>系统管理</span>
            </div>
          </div>
        </div>
      </div>
      <div class="login-right">
        <div class="login-form-container">
          <div class="login-header">
            <h2>用户登录</h2>
            <p>请输入您的账号信息</p>
          </div>
          <login-form></login-form>
          <div class="login-footer">
            <p>还没有账号？ <el-link type="primary" @click="$router.push('/register')">立即注册</el-link></p>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import LoginForm from '@/components/Auth/Login.vue'
import { User, School, Setting } from '@element-plus/icons-vue'

export default {
  name: 'LoginPage',
  components: {
    LoginForm,
    User,
    School,
    Setting
  }
}
</script>

<style scoped>
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-container {
  display: flex;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  max-width: 900px;
  width: 100%;
  min-height: 600px;
}

.login-left {
  flex: 1;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 60px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.welcome-content h1 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  font-weight: 600;
}

.welcome-content p {
  font-size: 1.1rem;
  margin-bottom: 40px;
  opacity: 0.9;
  line-height: 1.6;
}

.features {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 1.1rem;
}

.feature-item .el-icon {
  font-size: 1.5rem;
}

.login-right {
  flex: 1;
  padding: 60px 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-form-container {
  width: 100%;
  max-width: 400px;
}

.login-header {
  text-align: center;
  margin-bottom: 40px;
}

.login-header h2 {
  font-size: 2rem;
  color: #2c3e50;
  margin-bottom: 10px;
  font-weight: 600;
}

.login-header p {
  color: #7f8c8d;
  font-size: 1rem;
}

.login-footer {
  text-align: center;
  margin-top: 30px;
  color: #7f8c8d;
}

@media (max-width: 768px) {
  .login-container {
    flex-direction: column;
    max-width: 400px;
  }
  
  .login-left {
    padding: 40px 20px;
  }
  
  .login-right {
    padding: 40px 20px;
  }
  
  .welcome-content h1 {
    font-size: 2rem;
  }
}
</style> 